import mongo.main
import uvicorn
from platform import platform
from fastapi import FastAPI

app = FastAPI()
app.add_route(mongo.main.APIRouter)
if __name__ == '__main__':
    # 获取当前环境及工作线程
    if platform().__contains__("Windows"):
        workers = 1
    uvicorn.run("main:app", workers=workers, host="localhost", port=8080)

